<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<%@ include file="/WEB-INF/jsp/admin/inc/taglibs.jsp"%>
	<%@ include file="/WEB-INF/jsp/admin/inc/meta.jsp"%>
     <script type="text/javascript">
            /* <![CDATA[ */
            jQuery(function(){
                jQuery("#name").validate({
                    expression: "if (VAL) return true; else return false;",
                    message: "会员名不能为空"
                });
                jQuery("#nickName").validate({
                    expression: "if (VAL) return true; else return false;",
                    message: "会员别名不能为空"
                });
                jQuery("#repassword").validate({
                    expression: "if ((VAL == jQuery('#password').val())) return true; else return false;",
                    message: "两次输入的密码不一致"
                });
                jQuery("#email").validate({
                    expression: "if (isVEmail(VAL)) return true; else return false;",
                    message: "请输入正确的邮箱地址"
                });
                jQuery("#birthday").validate({
                    expression: "if (isVDate(VAL)) return true; else return false;",
                    message: "请输入出生年月"
                });
                jQuery("#sex").validate({
                    expression: "if (isVSelected(VAL)) return true; else return false;",
                    message: "请选择性别"
                });
                jQuery('#item').validated(function(){
					//alert("通过验证");
                	edit_item('${entity}',approot+'/admin/${entity}/list/menu/0/0');
				});
            });
            /* ]]> */
        </script>
</head>  
  <body style="background:#E8F5FE; padding:15px 18px;" class="scroll_r">
<div id="right_w"><p>当前位置：系统管理 >>修改商品</p></div>

<form method="post" action="" id="item">
  <table border="0" cellpadding="0" cellspacing="1" width="92%" align="center" class="tab_l">
    <tr>
      <td><b>请按要求填写：</b></td>
      <td align="right">带<span style="color:#ff0000;">*</span>为必填</td>
    </tr>
  </table>
 <table border="0" cellpadding="0" cellspacing="1" width="92%" align="center" id="add_tab">
  <tr>
   <th width="20%"><span style="color:#ff0000; margin:0;">*</span>会员名：</th>
   <td width="80%"><input type="text" id="name" name="name" value="${item.name}"></td>
  </tr>
  <tr>
   <th width="20%"><span style="color:#ff0000; margin:0;">*</span>会员别名：</th>
   <td width="80%"><input type="text" id="nickName" name="nickName" value="${item.nickName}"></td>
  </tr>
  <tr>
   <th width="20%"><span style="color:#ff0000; margin:0;">*</span>登录密码：</th>
   <td width="80%"><input type="password" id="password" name="password"></td>
  </tr>
  <tr>
   <th width="20%"><span style="color:#ff0000; margin:0;">*</span>确认密码：</th>
   <td width="80%"><input type="password" id="repassword" name=""></td>
  </tr>
  <tr>
   <th width="20%"><span style="color:#ff0000; margin:0;">*</span>邮箱：</th>
   <td width="80%"><input type="text" id="email" name="email" value="${item.email}"></td>
  </tr>
  <tr>
   <th width="20%"><span style="color:#ff0000; margin:0;">*</span>生日：</th>
   <td width="80%"><input type="text" id="birthday" name="birthday" value="${item.birthday}" class="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"/></td>
  </tr>
  <tr>
   <th width="20%"><span style="color:#ff0000; margin:0;">*</span>性别：</th>
   <td width="80%">
   <select name="sex" id="sex">
   <option value="-1" <c:if test="${item.sex=='-1'}">selected="selected"</c:if>>请选择</option>
   <option value="0" <c:if test="${item.sex=='0'}">selected="selected"</c:if>>女</option>
   <option value="1" <c:if test="${item.sex=='1'}">selected="selected"</c:if>>男</option>
   </select>
   </td>
  </tr>

 </table>
  <p id="tab_but">
   <input type="hidden" name="id" value="${item.id}"/>
   <input type="submit" value="提 交">
   <input type="button" value="返回" onclick="history.go(-1)">
   </p>
</form>
</body>
</html>
